home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.6 KB | 49 lines | [TEXT/GEOL] |
- Item 8837423 11-Jan-90 10:29
-
- From: D5369 Mgmt Sys Des, Chuck McMath,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: AssumeFocused Errors…
-
- Can you _ALWAYS_ avoid AssumeFocused errors?
-
- When I create a window it tries to determine its size (variable sized view).
- At the end of my DoMakeViews method, I initialize my view. In the view
- initialization code I make these calls:
-
- IF SELF.Focus THEN ;
- SampleToScreen(0, origin);
-
- SampleToScreen looks like this:
-
- PROCEDURE TAudioView.SampleToScreen(theSample: LongInt;
- VAR theScreen: INTEGER);
- VAR
- vTemp: VPoint;
- tempPt:Point;
- BEGIN
- SetVPt(vTemp, (theSample DIV fDispScale) + kSoundBarInset, 0);
- tempPt := ViewToQDPt(vTemp);
- theScreen := tempPt.h;
- END; { TAudioView.SampleToScreen }
-
-
-
- I get an AssumeFocused failure in ViewToQDPt, so the Focus operation _must_ be
- failing. The window/view are not visible at this point, and looking at Focus
- makes me pretty sure that that's why it doesn't work right at the beginning.
-
- Is there any way to avoid this other than perhaps by making my window/view
- visible as early as possible?
-
-
- [NOTE: I know Focusing was discussed a few months ago here, but I am posting
- this because a knowledgeable friend insisted that _all_ AssumeFocused problems
- indicated errors on my part, and I don't believe him].
-
- Thanks.
-
- chuck mcmath
-
-